/*
 * @Date: 2024-04-20 13:09:33
 * @LastEditors: 玄绮 shijiahansi@qq.com
 * @LastEditTime: 2024-04-20 15:32:52
 * @FilePath: \BigTalkDataStructure\test\test_bitree.c
 */
#include <stdio.h>
#include <stdlib.h>
#include <tree/bitree.h>

int main(int argc, char const* argv[]) {
    {
        int       a[10] = {62, 88, 58, 47, 35, 73, 51, 99, 37, 93};
        PBiTree_t t = NULL;

        for (int i = 0; i < 10; ++i) {
            bitree_insert(&t, a[i]);
        }

        bitree_display_BST(t);
        printf("\n");

        PBiTree_t p;
        if (bitree_find(t, 47, &p)) {
            bitree_display_BST(p);
        }
        printf("\n");

        bitree_delete(&t, 47);

        bitree_display_BST(t);
        
    }
    return 0;
}